﻿// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.

// Write your JavaScript code.
jQuery["postJSON"] = function( url, data, callback,error ) {
    // shift arguments if data argument was omitted
    if ( jQuery.isFunction( data ) ) {
        callback = data;
        data = undefined;
    }

    return jQuery.ajax({
        url: url,
        type: "POST",
        contentType:"application/json; charset=utf-8",
        dataType: "json",
        data:JSON.stringify( data),
        success: callback,
        error:error
    });
};
const ax = axios.create({
    baseURL: window.location.origin + window.basepath,
  timeout: 1000,
  headers: {'X-Custom-Header': 'foobar'}
});